export default{
    namespaced:true,
    state(){
        return{
            system: [],
            gamelist: [],
            orderlist:[]
        }
    },
    mutations: {
        getarea(state, area) {
            area.areas.forEach((v,i)=>{
                area.areas[i].text=(area.areas[i].name);
                area.areas[i].children=[]
                area.areas[i].child.forEach(v2=>{
                    v2.text=v2.name
                    area.areas[i].children.push(v2)
                })
            })
            // console.log(area.areas);
            state.system =area.areas;

        },
        getgame(state,gamelist){
            // console.log(gamelist);
            gamelist.games.forEach((v,i)=>{
                state.gamelist[i]=v.GAME_NAME
            })
        },
        getorderlist(state,orderlist){
            state.orderlist=orderlist
        }
    }
    
}